package com.baidu.jiuhao.es.service;

import com.baidu.jiuhao.es.authconf.JiuhaoConfig;
import com.baidubce.auth.BceCredentials;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;


@Component
@RequiredArgsConstructor
public class BceCredentialsService implements BceCredentials {


    private final JiuhaoConfig jiuhaoConfig;

    @Override
    public String getAccessKeyId() {
        return jiuhaoConfig.getAccessKeyID();
    }

    @Override
    public String getSecretKey() {
        return jiuhaoConfig.getAccessKeySecret();
    }
}
